FROM ubuntu:20.04

LABEL top.yhuan.image.author="yhuan416 <yhuan416@foxmail.com>"
LABEL top.yhuan.image.apt-sources="repo.huaweicloud.com"

# set root passwd
RUN echo "root:root" | chpasswd

# timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' > /etc/timezone

# apt-get
WORKDIR /etc/apt
RUN cp sources.list sources.list.save && \
    sed -i "s@/archive.ubuntu.com@/repo.huaweicloud.com@g" sources.list && \
    sed -i "s@/security.ubuntu.com@/repo.huaweicloud.com@g" sources.list
RUN apt-get clean;

WORKDIR "/root"

ENTRYPOINT ["/bin/bash"]

RUN apt-get update && \
    apt-get install wget unzip -y

RUN wget -q -O QSign.zip 'https://www.yuanxiapi.cn/api/lanzou/?url=https://overtimebunny.lanzoul.com/QSignX&type=down' && \
    unzip QSign.zip

EXPOSE 4996

CMD [ "X" ]
